# # l<=r
#
# s_lis = list(s)
# # print(s_lis)
# l, r = 0, len(s_lis) - 1
# i=1
# while l < r:
#     if s_lis[l] != s_lis[r]: # 字母不相等
#         # 可以删除一个
#         if i == 1:
#              i-=1
#              if s_lis[l+1] == s_lis[r]:
#                  l=l+1+1
#                  r-=1
#                  continue
#              if s_lis[l] == s_lis[r-1]:
#                  l+=1
#                  r=r-1-1
#                  continue
#              elif s_lis[l+1] == s_lis[r] or s_lis[l] == s_lis[r-1] ==False:
#                  print(False)
#                  break
#         if i!=1:
#             print(False)
#             break
#     else:       #字母相等
#         l+=1
#         r-=1
#         continue
#
# else:
#     print(True)
#
#
# print(s[18:21])
#两个两个呢
s="aba"
s_lis = list(s)
l, r = 0, len(s_lis) - 1
def isPalindrome(x):
    return x==x[::-1]
while l<=r:
    if s_lis[l] == s_lis[r]:
        l+=1
        r-=1
    else:
        result=isPalindrome(s_lis[l+1:r+1]) or isPalindrome(s_lis[l:r])
        print(result)
        break
else:
    print(True)



